package app.test.com.beginner.server;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * 作者：韩笑 on 2017-08-12 14:03
 * <p>
 * 作用：广播
 */


public class FuckReceiver extends BroadcastReceiver {
    private static final String TAG = FuckReceiver.class.getSimpleName();

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();// 获取对应Action
        switch (action) {
            case "close":
                Intent startIntent = new Intent(context, ToolsServer.class);
                startIntent.putExtra("close","close");
                context.startService(startIntent);
                break;
        }
    }
}
